//                            https://ac.nowcoder.com/acm/contest/5600/F




#include<bits/stdc++.h>
using namespace std;

int main()
{
    int n, m;
    cin >> n >> m;
    vector<int> A(n - m);
    for (auto& x : A)
        cin >> x;
    sort(A.begin(), A.end());
    int sum = accumulate(A.begin(), A.end(), 0);
    cout << (sum + m) * 1. / n << " ";
    cout << (sum + 5 * m) * 1. / n << " ";
}